<?php

use yii\db\Schema;
use yii\db\Migration;

class m161227_084250_add_creative_custom_field extends Migration
{
    public function up()
    {
        $sql = <<<FINE
alter table {{%creative}} add column is_custom tinyint(1) not null default 0 comment 'custom creative flag' after is_static;
alter table {{%creative}} add column custom_code text comment 'custom creative code' after txt;
FINE;
        return $this->execute($sql);
    }

    public function down()
    {
        echo "m161227_084250_add_creative_custom_field cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
